<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page import="com.ncpowernode.javaweb.bean.Book" %>
<%@page isELIgnored="false" %>

<html>
<head>
    <title>图书馆图书展示</title>
    <base href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/">
    <style type='text/css'>
        table{
            height:200px;
            width:350px;
            border:2px solid pink;
            border-collapse:collapse;
        }
        a{
            color:black;
            text-decoration:none;
        }
        a:hover{
            color:pink;
            text-decoration:underline;
            cursor:pointer;
        }
    </style>
</head>
<body>
    <h1 align='center'>图书馆图书列表</h1>
    <hr color='green'/>
    <table border='1px' align = 'center'>
        <tr>
            <%--<th>序号</th>--%>
            <th>书籍编号</th>
            <th>书籍名称</th>
            <th>书籍作者</th>
            <th>书籍价格</th>
            <th colspan='3'>操作</th>
        </tr>
        <c:forEach items="${books}" var="book" varStatus="bookStatus" >
            <tr>
                <%--<td align='center'>${bookStatus.count}</td>--%>
                <td align='center'>${book.id}</td>
                <td align='center'>${book.bookName}</td>
                <td align='center'>${book.author}</td>
                <td align='center'>${book.price}</td>
                <td align="center"><a href="book/delete?id=${book.id}">删除</a></td>
                <td align='center'><a href='book/modify?flag=t&id=${book.id}'>修改（价格）</a></td>
                <td align='center'><a href='book/appraise?appraise=${book.appraise}'>评价</a></td>
            </tr>
        </c:forEach>
    </table>
    <hr color='pink'/>
    <a href='add.html'>新增图书</a>
</body>
</html>
